﻿using HXDNB.DAL;
using HXDNB.Infrastructure;
using System;
using System.Linq;
using System.Web.Mvc;

namespace HXDNB.CMS.Controllers
{
    public class SystemController : BaseController
    {
        //日志列表        
        public ActionResult List(string type, int index = 0)
        {
            LogBLL Bll = new LogBLL();
            IQueryable<HXDNB.DAL.Log> List = Bll.GetList(type == "ALL" ? null : type);
            Paging<HXDNB.DAL.Log> Pag = new Paging<HXDNB.DAL.Log>(index, List);
            ViewBag.PagList = Pag;
            return View();
        }
        //日志删除
        [HttpPost]
        public string Delete()
        {
            LogBLL Bll = new LogBLL();
            bool result = true;
            result = Bll.Delete(DateTime.Now.AddMonths(-3));
            return result.ToString();
        }
    }
}
